﻿@using Smartstore.Admin.Models.Common 

@{
    ViewBag.Title = T("Admin.Common.About").Value;
    string license = T("Admin.Common.License").Value;

    var libraries = new List<LibraryModel>
    {
        new LibraryModel("ASP.NET Core", "https://github.com/dotnet/aspnetcore/", LibraryLicense.MIT, "Microsoft Corporation"),
        new LibraryModel("Entity Framework Core", "https://github.com/dotnet/efcore/", LibraryLicense.MIT, "Microsoft Corporation"),
        new LibraryModel("Autofac", "http://autofac.org/", LibraryLicense.MIT, "Autofac Contributors"),
        new LibraryModel("Json.NET", "https://www.newtonsoft.com/json/", LibraryLicense.MIT, "2007 James Newton-King"),
        new LibraryModel("Fluent Validation", "https://github.com/JeremySkinner/FluentValidation/", LibraryLicense.Apache2, "Jeremy Skinner 2008-2022"),
        new LibraryModel("SixLabors ImageSharp", "https://github.com/SixLabors/ImageSharp/", LibraryLicense.Apache2, "2022 ImageSharp Contributors"),
        new LibraryModel("Summernote", "https://summernote.org/", LibraryLicense.MIT, "2015~ Summernote Team"),
        new LibraryModel("ExcelDataReader", "https://github.com/ExcelDataReader/ExcelDataReader", LibraryLicense.MIT, "2014 ExcelDataReader"),
        new LibraryModel("JavaScriptEngineSwitcher", "https://github.com/Taritsyn/JavaScriptEngineSwitcher/", LibraryLicense.Apache2, "Andrey Taritsyn 2013-2022"),
        new LibraryModel("jQuery", "http://jquery.com/", LibraryLicense.MIT, "OpenJS Foundation and other contributors"),
        new LibraryModel("DB-IP Country Lite", "https://db-ip.com/", LibraryLicense.CreativeCommons4, "2022 db-ip.com"),
        new LibraryModel("Linearicons by Perxis", "https://linearicons.com/", LibraryLicense.CreativeCommons, "2018 Linearicons.com"),
        new LibraryModel("MiniProfiler", "http://miniprofiler.com/", LibraryLicense.MIT, ".NET MiniProfiler Contributors"),
        new LibraryModel("NuGet", "https://github.com/NuGet/Home/", LibraryLicense.Apache2, ".NET Foundation"),
        new LibraryModel("NUnit", "http://www.nunit.org/", LibraryLicense.MIT, "2022 Charlie Poole, Rob Prouse"),
        new LibraryModel("PhotoSwipe", "http://photoswipe.com/", LibraryLicense.MIT, "2014-2019 Dmitry Semenov, http://dimsemenov.com"),
        new LibraryModel("slick (carousel)", "http://kenwheeler.github.io/slick/", LibraryLicense.MIT, "2013-2022 Ken Wheeler"),
        new LibraryModel("Bootstrap", "https://github.com/twbs/bootstrap/", LibraryLicense.MIT, "2011-2022 Twitter, Inc., 2011-2022 The Bootstrap Authors"),
        new LibraryModel("underscore.js", "http://underscorejs.org/", LibraryLicense.MIT, "2009-2021 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors"),
        new LibraryModel("wkhtmltopdf", "http://wkhtmltopdf.org/", LibraryLicense.LGPL, "2007 Free Software Foundation, Inc. http://fsf.org/"),
        new LibraryModel("AngleSharp", "https://github.com/AngleSharp/AngleSharp/", LibraryLicense.MIT, "2013 - 2021 AngleSharp"),
        new LibraryModel("Reactive Extensions for .NET", "https://github.com/dotnet/reactive/", LibraryLicense.MIT, ".NET Foundation and Contributors"),
        new LibraryModel("Autoprefixer Host for .NET", "https://github.com/Taritsyn/AutoprefixerHost/", LibraryLicense.MIT, "2019-2021 Andrey Taritsyn"),
        new LibraryModel("FluentFtp", "https://github.com/robinrodricks/FluentFTP/", LibraryLicense.MIT, "2018 Nicholas Briscoe"),
        new LibraryModel("Cron Expression Descriptor", "https://github.com/bradymholt/cron-expression-descriptor/", LibraryLicense.MIT, "2015 Robin Rodricks and FluentFTP Contributors"),
        new LibraryModel("DotLiquid", "https://github.com/dotliquid/dotliquid/", LibraryLicense.MSPL, "2022 DotLiquid Contributors"),
        new LibraryModel("FluentMigrator ", "https://github.com/fluentmigrator/fluentmigrator/", LibraryLicense.Apache2, "2022 FluentMigrator Contributors"),
        new LibraryModel("HtmlSanitizer", "https://github.com/mganss/HtmlSanitizer/", LibraryLicense.MIT, "2013-2016 Michael Ganss and HtmlSanitizer contributors"),
        new LibraryModel("Humanizer", "https://github.com/Humanizr/Humanizer/", LibraryLicense.MIT, "2022 .NET Foundation and Contributors"),
        new LibraryModel("MailKit", "http://www.mimekit.net/", LibraryLicense.MIT, "2012-2021 .NET Foundation and Contributors"),
        new LibraryModel("MaxMind DB Reader", "https://github.com/maxmind/MaxMind-DB-Reader-dotnet/", LibraryLicense.Apache2, "2013-2020 MaxMind, Inc."),
        new LibraryModel("GeoIP2 .NET API", "https://github.com/maxmind/GeoIP2-dotnet/", LibraryLicense.Apache2, "2013-2021 MaxMind, Inc."),
        new LibraryModel("Moq", "https://github.com/moq/moq4/", LibraryLicense.BSD3, "2007, Clarius Consulting, Manas Technology Solutions, InSTEDD, and Contributors"),
        new LibraryModel("NCrontab", "https://github.com/atifaziz/NCrontab/", LibraryLicense.Apache2, "2022 NCrontab Contributors"),
        new LibraryModel("Parlot", "https://github.com/sebastienros/parlot/", LibraryLicense.BSD3, "2020, Sébastien Ros"),
        new LibraryModel("Pomelo.EntityFrameworkCore.MySql", "https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/", LibraryLicense.MIT, "2017 Pomelo Foundation"),
        new LibraryModel("Npgsql.EntityFrameworkCore.PostgreSQL", "https://github.com/npgsql/efcore.pg/", LibraryLicense.PostgreSQL, "2002-2021, Npgsql"),
        new LibraryModel("PreMailer.Net", "https://github.com/milkshakesoftware/PreMailer.Net/", LibraryLicense.MIT, "2013 Milkshake Software (http://milkshakesoftware.com)"),
        new LibraryModel("Serilog", "https://github.com/serilog/serilog/", LibraryLicense.Apache2, "2013-2020 Serilog Contributors"),

        new LibraryModel("AsyncKeyedLock", "https://github.com/MarkCiliaVincenti/AsyncKeyedLock/", LibraryLicense.MIT, "2024 Mark Cilia Vincenti"),
        new LibraryModel("Barcoder", "https://github.com/huysentruitw/barcoder/", LibraryLicense.MIT, "2018-2022 Wouter Huysentruit"),
        new LibraryModel("LumenWorks CSV Reader", "https://github.com/phatcher/CsvReader/", LibraryLicense.MIT, "2005-2011 Sébastien Lorion, 2014 Paul Hatcher"),
        new LibraryModel("Nuke", "https://github.com/nuke-build/nuke/", LibraryLicense.MIT, "2023 Maintainers of NUKE"),
        new LibraryModel("Polly", "https://github.com/App-vNext/Polly/", LibraryLicense.BSD3, "2015-2023, App vNext"),
        new LibraryModel("SharpScss", "https://github.com/xoofx/SharpScss/", LibraryLicense.BSD3, "2016-2020, Alexandre Mutel"),
        new LibraryModel("Swashbuckle", "https://github.com/domaindrivendev/Swashbuckle.AspNetCore/", LibraryLicense.MIT, "2016 Richard Morris"),
        new LibraryModel("System.Linq.Dynamic.Core", "https://github.com/zzzprojects/System.Linq.Dynamic.Core/", LibraryLicense.Apache2, "2016 Stef Heyenrath"),
    };
}

<div class="section-header">
    <div class="title">
        <i class="fa fa-info-circle"></i>
        @T("Admin.Common.About")
    </div>
</div>

<style>
    .work-list li {
        margin: 10px 0 15px 0;
    }
    .work-list li .name {
        font-weight: 600;
    }
</style>

<div style="max-width: 1000px">
    <p>
        Version @SmartstoreVersion.CurrentFullVersion<br />
        Copyright &copy; 1999-@DateTime.Today.Year SmartStore AG<br />
        <a href="https://www.smartstore.com/" target="AboutTargetWin">www.smartstore.com</a>,
        <a href="https://github.com/smartstore/Smartstore" target="AboutTargetWin">github.com/smartstore/Smartstore</a>
    </p>

    <p class="mt-5">
        @Html.Raw(T("Admin.Help.OtherWorkNote"))
    </p>

    <p>
        <ul class="work-list list-unstyled">
            @foreach (var lib in libraries.OrderBy(x => x.Name))
            {
                <li>
                    <div class="name">
                        <a href="@lib.Url" rel="nofollow" target="AboutTargetWin">@lib.Name</a>
                    </div>
                    <div sm-if="lib.Copyright.HasValue()" class="copyright">
                        Copyright &copy; @Html.Raw(lib.Copyright)
                    </div>
                    <span class="license">
                        <span>@T("Common.License"):</span>
                        @if (lib.License == LibraryLicense.MIT)
                        {
                            <a href="http://en.wikipedia.org/wiki/MIT_License" rel="nofollow" target="AboutTargetWin">MIT</a>
                        }
                        else if (lib.License == LibraryLicense.MPL20)
                        {
                            <a href="http://en.wikipedia.org/wiki/Mozilla_Public_License" rel="nofollow" target="AboutTargetWin">Mozilla Public License 2.0 (MPL-2.0)</a>
                        }
                        else if (lib.License == LibraryLicense.BSD3)
                        {
                            <a href="http://en.wikipedia.org/wiki/BSD_licenses" rel="nofollow" target="AboutTargetWin">BSD</a>
                        }
                        else if (lib.License == LibraryLicense.Apache2)
                        {
                            <a href="http://en.wikipedia.org/wiki/Apache_License" rel="nofollow" target="AboutTargetWin">Apache License 2.0</a>
                        }
                        else if (lib.License == LibraryLicense.MSPL)
                        {
                            <a href="http://opensource.org/licenses/MS-PL" rel="nofollow" target="AboutTargetWin">MS-PL</a>
                        }
                        else if (lib.License == LibraryLicense.LGPL)
                        {
                            <a href="http://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License" rel="nofollow" target="AboutTargetWin">GNU Lesser General Public License (LGPL)</a>
                        }
                        else if (lib.License == LibraryLicense.GPLv3)
                        {
                            <a href="http://en.wikipedia.org/wiki/GNU_General_Public_License" rel="nofollow" target="AboutTargetWin">GPL 3.0</a>
                        }
                        else if (lib.License == LibraryLicense.CreativeCommons)
                        {
                            <a href="http://creativecommons.org/licenses/by-sa/3.0/" rel="nofollow" target="AboutTargetWin">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>
                        }
                        else if (lib.License == LibraryLicense.CreativeCommons4)
                        {
                            <a href="https://creativecommons.org/licenses/by/4.0/" rel="nofollow" target="AboutTargetWin">Creative Commons Attribution 4.0 International License</a>
                        }
                        else if (lib.License == LibraryLicense.PostgreSQL)
                        {
                            <a href="https://www.postgresql.org/about/licence/" rel="nofollow" target="AboutTargetWin">PostgreSQL License</a>
                        }
                    </span>
                </li>
            }
        </ul>
    </p>
</div>
